Page({
  data: {
    goodsDetail: {}
  },
  onLoad(options) {
    const goodsDetail = JSON.parse(options.goodsDetail);
    goodsDetail.goodsImage = 'http://kjxycode.zisu.edu.cn' + goodsDetail.goodsImage;
    this.setData({ goodsDetail });
  },
  addToCart() {
    wx.showToast({
      title: '已加入购物车',
      icon: 'success'
    });
  }
});